<?php

class WxController extends Controller
{
    public function NotifyAction()
    {
        require_once APP_ROOT."/lib/php_sdk/lib/WxPay.Api.php";
        require_once APP_ROOT."/lib/php_sdk/lib/WxPay.Notify.php";
        require_once APP_ROOT."/lib/php_sdk/example/WxPay.Config.php";
        require_once APP_ROOT."/lib/php_sdk/example/notify.php";

        $config = new WxPayConfig();
        Log::write('begin notify', 'INFO', 'dealer_notify_'.date('Y-m-d'));
        $notify = new PayNotifyCallBack();
        $notify->Handle($config, false);
    }
}